package com.bw.module_attendance.adapter

import android.graphics.Color
import com.bw.module_attendance.R
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
/**
 * 工单-智慧园区-考勤管理
 */
class AttendanceCateAdapter :
    BaseQuickAdapter<String, BaseViewHolder>(R.layout.item_cate_attendance) {
    var currentIndex: Int = 0
    override fun convert(holder: BaseViewHolder, item: String) {
        if (currentIndex === holder.position) {
            holder.setTextColor(R.id.tv, Color.parseColor("#FFFFFF"))
            holder.setBackgroundColor(R.id.tv, Color.parseColor("#4A90E2"))
            holder.setText(R.id.tv, item)
        } else {
            holder.setTextColor(R.id.tv, Color.parseColor("#4B5563"))
            holder.setBackgroundColor(R.id.tv, Color.parseColor("#F9FAFB"))
            holder.setText(R.id.tv, item)
        }
    }
}